{extend name="public/base" /} {block name="body"}
<div class="content-tabs">
	<ol class="breadcrumb">
		<li>
			<a href="{:url('index/index')}"><i class="fa fa-home"></i></a>
		</li>
		<li><strong>商家联盟列表</strong></li>
	</ol>
</div>
<div class="ibox float-e-margins">
	<div class="ibox-content">
		<form id="myForm" class="form-horizontal m-t" method="post" action="{:url('search')}">
		    <div class="row">
					<div class="form-group">
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							负责人名称<input type="text" id="shopowner" name="shopowner" value="" placeholder="请输入名称" class="bank" />
							联盟名称<input type="text" id="name" name="name" value="" placeholder="请输入名称" class="bank" />
							审核状态<select name="status" class="bank">
								<option value="0">全部</option>
								<option value="1">审核中</option>
								<option value="2">审核通过</option>
								<option value="3">审核不通过</option>
							</select>
						            添加时间<input type="text" id='createtime' name='createtime'   onclick='WdatePicker()'  placeholder="开始时间" class="bank" />
						            <input type="text" id='end_time' name='end_time'   onclick='WdatePicker()'  placeholder="结束时间" class="bank" />
                                  <input type='hidden' name="end_time"  value="2017-4-1" >
							
												<span class="bank" style="border-radius:0px;border:1px;"><button type="submit" class="btn btn-sm btn-primary"><li class="fa fa-search"> 查询</li></button> </span>

					</div> 
        	</div>
        </form>
		<div class="hr-line-dashed"></div>
            <div class="example-wrap">
                <div class="example">
                    <table class="table table-bordered table-hover">
                        <thead >
                            <tr class="long-tr" >
                                <th>id</th>
                                <th style="text-align: center;">logo</th>
                                <th style="text-align: center;"	>名称</th>
                                <th style="text-align: center;width: 10%;">地址</th>
                                <th style="text-align: center;">电话</th>
                                <th style="text-align: center;">创建时间</th>
                                <th style="text-align: center;">负责人</th>
                                <th style="text-align: center;">审核状态</th>
                                <th style="text-align: center;">联盟状态</th>
								<th style="text-align: center;">排序</th>
                                <th style="text-align: center;">操作</th>
                            </tr>
                        </thead>
                        <tbody id="list">
                        	{volist name="list" id='ad'}
                        	<tr>
                        		<td>{$ad.id}</td>
                        		<td><img src="{$ad.thumb}"  width="50px"/></td>
                        		<td><a href="{:url('edit',['id'=>$ad.id])}" >{$ad.name}</a></td>
                        		<td>{$ad.address}</td>                       		
                        		<td>{$ad.store_tel}</td>
                        		<td>{$ad.createtime}</td>
                        		<td>{$ad.shopowner}</td>
                        		<td>
                        			{if $ad.status == 1}
                        			<a href="{:url('examines',['id'=>$ad.id])}" class="btn btn-danger bnt-sm">
										<i class="fa fa-paste"></i> 审核中</a>
                        			{elseif $ad.status == 2}
                        			<a href="{:url('examines',['id'=>$ad.id])}" class="btn btn-primary bnt-sm">
										<i class="fa fa-paste"></i> 审核</a>
                        			{else}
                        			<a href="{:url('examines',['id'=>$ad.id])}" class="btn btn-danger bnt-sm">
										<i class="fa fa-paste"></i> 不通过</a>
                        			{/if}
                        		</td>
                        		<td>
								                       			
										{if $ad.state == 1}
	                        			<a href="{:url('frzee',['id'=>$ad.id, 'state'=>$ad.state])}" class="btn btn-primary">正常</a>
	                        			{else}
	                        			<a href="{:url('frzee',['id'=>$ad.id, 'state'=>$ad.state])}" class="btn btn-danger">冻结</a>
	                        			{/if}</td>
                        		<td>{$ad.sort}</td>
                        		<td>	
										<a href="{:url('show',['id'=>$ad.id])}" class="btn btn-primary bnt-sm">
										<i class="fa fa-paste"></i> 查看成员</a>
                        		</td>
                        	</tr>
                        	{/volist}
                        </tbody>
                    </table>
                    <div style="text-align: right;">
                      {$list->render()}
                    </div>
                </div>
            </div>
            </div>
</div>
{/block} {block name="script"}
<script src="__LIB__/datepicker/WdatePicker.js"></script>
<script>
</script>
<style>
.bank{
	width: 150px;
    height:30px;
    
    text-align:center;
    border-radius:5px;
}
{/block}